import { combineReducers } from 'redux-immutable'
import * as types from './constant'

export function displayWeatherCondition(state = {}, action) {
    switch (action.type) {
        case types.FETCH_WEATHER_CONDITION:
            if (action.error !== undefined) {
                return Object.assign({}, action.error)
            } else {
                return Object.assign({}, action.data)
            }
        default:
            return state
    }
}

export default combineReducers({
    displayWeatherCondition
})